// 数字枚举
var Direction;
(function (Direction) {
    Direction[Direction["Up"] = 1] = "Up";
    Direction[Direction["Down"] = 2] = "Down";
    Direction[Direction["Left"] = 3] = "Left";
    Direction[Direction["Right"] = 4] = "Right";
    Direction[Direction["OF"] = 5] = "OF"; // 对应的值会自增为5
})(Direction || (Direction = {}));
console.log('Direction', Direction)
console.log('Direction.Up', Direction.Up); // 通过键名或者键值
console.log('Direction.Up', Direction[2]); // 可通过键值来获得 键名
console.log(Direction.OF);
var Directionss;
(function (Directionss) {
    Directionss[Directionss["Up"] = 0] = "Up";
    Directionss[Directionss["Down"] = 1] = "Down";
    Directionss[Directionss["Left"] = 2] = "Left";
    Directionss[Directionss["Right"] = 3] = "Right";
})(Directionss || (Directionss = {}));
console.log('Directionss.Up', Directionss.Up);
var Response1;
(function (Response1) {
    Response1[Response1["No"] = 0] = "No";
    Response1[Response1["Yes"] = 1] = "Yes";
})(Response1 || (Response1 = {}));
function respond(recipient, message) {
    console.log('message', message);
}
respond("Princess Caroline", Response1.Yes); // 枚举中无的字段则为 undefined
